<!DOCTYPE html>
<html>
{include file="public/head" /}
<body>
          <div class="nav-tabs-custom" style="box-shadow:0 0 0 0; margin:5px;">
            <ul class="nav nav-tabs">
            <li class="active"><a href="#tab_1" data-toggle="tab">基础设置</a></li>
            <li><a href="#tab_2" data-toggle="tab">扩展设置</a></li>               
            </ul> 
        <form id="myform" class="myform form-horizontal"  method="post">
        <input type="hidden" id="tv_id" name="tv_id" value="{$info['tv_id']|default=''}"> 
       <div class="box-body">
           <div class="tab-content tab-fade fade active in " id="tab_1"> 
           <div class="row">
               <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">节目分类：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <div class="select-group-t w150" style="margin-right:5px;">
                <select id="tv_cid" name="tv_cid" class="form-control select2" required="required" placeholder="请选择分类" style="width:100%">
                <option value=''>选择分类</option>
{volist name=":F('_data/listtv')" id="vo"}
 {notempty name="vo.son"}
<optgroup label="{$vo.list_name}">
{volist name="vo['son']" id="splist"}
<option value="{$splist.list_id}" {eq name="splist.list_id" value="$info['tv_cid']"}selected{/eq}>├ {$splist.list_name}</option>
{/volist}
  </optgroup>
{else/}
  <option value="{$vo.list_id}" {eq name="vo.list_id" value="$info['tv_cid']"}selected{/eq}>{$vo.list_name}</option>
{/notempty}
{/volist}
</select></div>

               
<div class="select-group-t w150" style="margin-right:5px;">
             <select id="tv_area" name="tv_area" class="form-control select2" style="width:100%">
             <option value=''>地区</option>
{notempty name="info.tv_area"}<option value='{$info.tv_area}' selected>{$info.tv_area}</option>{/notempty}{volist name=":explode(',',$video['video_area'])" id="val"}<option value="{$val}">{$val}</option>{/volist}
</select>
</div>
<div class="select-group-t w150" style="margin-right:5px;">
<select name="tv_status" class="form-control select2" style="width:100%">
    <option value="1">已审</option>
     <option value="0" {eq name="info.tv_status" value="0" }selected{/eq}>未审</option>
</select> 
</div>
               <div class="col-md-3 col-sm-6 col-xs-6 prr0 hidden-xs hidden-sm">
                <div class="input-group w35">
                 <span class="input-group-btn">
                      <button type="button" class="btn btn-default btn-flat form-title">颜色</button>
                    </span>
                <!-- /btn-group -->
                <div class="input-group color-input">
                       <input type="text" class="form-control" name="tv_color"  value="{$info.tv_color|default=''}">
                      <div class="input-group-addon"><i style="background-color: rgb(0, 0, 0);"></i></div>
                    </div>
                    </div>   
              </div> 
<span class="input-group-btn">
<span class="pretty success input-xz">
<input name="sendurl" type="checkbox" value="1" id="checkbox" {empty name="info['tv_id']"}checked{/empty}> 
<label><i class="mdi mdi-check"></i> 推送百度</label>
</span>
</span> 
</div>
               
              <div class="col-md-6 col-sm-6 col-xs-12 mb10 pr00">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">节目名称：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control" id="tv_name" name="tv_name" value="{$info.tv_name|default=''}" placeholder="填写节目名称" >
              </div>   
              </div>
               <div class="col-md-6 col-sm-6 col-xs-12 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">节目属性：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="hidden" name="tv_prty" value="">
             <span class="text-link form-control">
                      {volist name=":parse('textarea',config('setting.document_position'))" id="vo"}
                      <label class="pretty success">
	  <input type="checkbox" name="tv_prty[]" value="{$key}" id="checkbox" {if check_attribute($info['tv_prty'],$key)}checked="checked"{/if}> 
	  <label><i class="mdi mdi-check"></i> {$vo|msubstr=0,2}</label>
	</label>
                      {/volist} 
            </span> 
               </div> 
               </div> 
               
               
               <div class="col-md-4 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">节目API ID：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control text-center" id="tv_apiid" name="tv_apiid" value="{$info.tv_apiid|default=''}">
              </div>   
              </div>
               <div class="col-md-4 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">API类型：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control text-center" id="tv_apitype" name="tv_apitype" value="{$info.tv_apitype|default=''}">
              </div>   
              </div>              
               <div class="col-md-4 col-sm-6 col-xs-12 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">更新时间：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control text-center" id="tv_uptime" name="tv_uptime" value="{$info.tv_uptime|default='48'}" placeholder="填写数据自动更新时间小时">
                <span class="input-group-btn">
<span class="pretty success input-xz">
<input name="tv_checkdata" type="checkbox" value="1" id="checkbox" {empty name="info['tv_id']"}checked{/empty}> 
<label><i class="mdi mdi-check"></i> {empty name="info['tv_id']"}采集数据{else/}更新数据{/empty}</label>
</span>
</span>  
              </div>   
              </div>        
              <div class="col-md-12 col-sm-12 col-xs-12 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">节目图片：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
               <input class="form-control" size="50" id="tv_pic" name="tv_pic" type="text" value="{$info['tv_pic']|default=''}">
<span class="input-group-btn">
                      <button type="button" class="btn btn-primary btn-flat plupload" id="plupload-image" data-input-id="tv_pic" data-mimetype="image/*"   data-multiple="false"><i class="fa fa-upload"></i> 上传</button>
                    </span>
                     
              </div>   
              </div>
             <div class="col-md-12 col-sm-12 col-xs-12 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">直播地址：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
               <input type="text" name="tv_playurl" value="{$info.tv_playurl|default=''}" class="form-control" data-tip="用于前台调用直播">
                    </span>
                     
              </div>   
              </div>
                 <input type="hidden" name="tv_data" value="">
                <div class="margin15" id="urldata">
                {volist name="$info.tv_data" id="tv" key="uu"}
                <div class="urldata input-group mb20" id="data_{$uu}">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">周期{$uu}：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <div class="col-md-12 col-sm-12 col-xs-12 pl0 mb10 prr0">
                <div class="select-group-t w150 prr0">
                <select name="tv_data[{$uu-1}][week]" id="tv_week" class="form-control">
                 <option value=''>选择周期</option>
                {volist name="weeklist" id="val"}
                <option value="{$val}" {if condition="$val eq $tv['week']"}selected{/if}>{$i}.{$val}</option>
                {/volist}
                </select>
</div><div class="select-group-t w150 prr0">
                <input class="form-control datetimepicker" name="tv_data[{$uu-1}][date]" id="tv_date" value="{$tv.date}" placeholder="播出时间" id="createtime" data-date-format="YYYY年MM月DD日" type="datetime">
                </div>
                <label class="control-label hidden-xs" style="font-weight:normal">格式:时间$信息#节目名# 如：05:10$纪录片:#记住乡愁#第二季  多个回车换行</label>
               </div>
               <textarea name="tv_data[{$uu-1}][data]" id="tv_data" class="form-control" style="height:150px; margin-top:-1px;">{$tv.data}</textarea>
         </div> 
         {/volist}
         </div>   
                   <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">添加板块：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
              <button type="button" class="btn  btn-primary btn-flat addurl"><i class="fa fa-plus"></i> 添加周期信息</button>

              </div>                    
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">节目介绍：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <textarea  class="editor"  id="tv_content" name="tv_content"  style=" width:100%; height:200px">{$info['tv_content']}</textarea>
              </div> 
              

         
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">更新时间：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
              <input type="text" name="tv_addtime" value="{notempty name="info.tv_addtime"}{$info.tv_addtime|date='Y-m-d H:i:s',###}{else/}{:date('Y-m-d H:i:s',time())}{/notempty}" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss">
<span class="input-group-btn">
<span class="pretty success input-xz">
<input name="tv_checktime" type="checkbox" value="1" id="checkbox" {notempty name=":config('system.system_uptime')"}checked{/notempty}> 
<label><i class="mdi mdi-check"></i> 更新时间</label>
</span>
</span>     
              </div>              
               </div>
              <!-- /row --> 
            </div>
            <!-- /.tab_1-->
           <div class="tab-content tab-fade fade " id="tab_2">
            <div class="row">
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">节目标题：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="tv_title"  name="tv_title" value="{$info.tv_title|default=''}" placeholder="用于前台页面的SEO标题" class="form-control">
              </div>
              
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-title">节目关键词：</span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="tv_keywords"  name="tv_keywords" value="{$info.tv_keywords|default=''}" class="form-control" placeholder="用于前台页面的关键词,填写关键词获取,留空获取名称关键词长尾词" >
                <span class="input-group-btn">
                 <button type="button" class="btn btn-success btn-flat getkeywords" data-name="tv_name" data-names="tv_keywords" data-id="tv_keywords"><i class="fa fa-plus"></i> 获取关键词</button>
                 </span>
                 <span class="input-group-btn">
                 <span class="pretty success input-xz">
<input name="auto_keywords" type="checkbox" value="1" id="checkbox" {notempty name=":config('system.system_auto_keywords')"}checked{/notempty}> 
<label><i class="mdi mdi-check"></i> 自动获取</label>
</span>
</span> 

                
              </div>

              
              
                 <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">节目描述：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <textarea  class="form-control" name="tv_description" id="tv_description">{$info['tv_description']|default=''}</textarea>
              </div>
                <div class="input-group margin15">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">节目TAG：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="tv_tag"  name="tv_tag" value="{$info.tv_tag|default=''}" class="form-control tag" data-tip="TAG标签" >
                <span class="input-group-btn">
                 <button type="button" class="btn btn-success btn-flat btn-editone" href="{:url('tag/showajax',array('sid'=>7))}"  data-name="添加TAG"><i class="fa fa-plus"></i> 添加TAG</button>
                 </span>
                  <span class="input-group-btn">
                 <span class="pretty success input-xz">
<input name="auto_tag" type="checkbox" value="1" id="checkbox" {notempty name=":config('system.system_auto_tag')"}checked{/notempty}> 
<label><i class="mdi mdi-check"></i> 自动生成</label>
</span>
</span> 
              </div>
                 <div class="col-md-6 col-sm-6 col-xs-6 mb10" style="padding-right:0px;">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">节目拼音：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                 <input type="text" name="tv_letters"  value="{$info.tv_letters|default=''}"  class="form-control text-center" placeholder="留空自动获取">
              </div>   
              </div>
              <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">首字母：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                 <input type="text" name="tv_letter"  value="{$info.tv_letter|default=''}" class="form-control text-center" placeholder="留空自动获取">
              </div>   
              </div>             
             <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0000">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">推荐星级：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input name="tv_stars" id="tv_stars" type="hidden" value="{$info.tv_stars|default=''}">
                <span class="text-link form-control" style="padding-top:4px;">
                {volist name=":admin_star_arr($info.tv_stars)" id="ajaxstar"}<img src="{$Think.TPL_PATH}tpl/zanpianadmin/img/star{$ajaxstar}.gif" id="tv_{$i}" class="addstars" width="19px" height="19px">{/volist}
                </span>
              </div>   
              </div>              
             <div class="col-md-6 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">独立模版：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="tv_skin"  value="{$info.tv_skin|default=''}" class="form-control text-center" placeholder="留空使用分类中内容模版">
              </div>   
              </div> 
              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">总人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="tv_hits" name="tv_hits"  value="{$info.tv_hits|default=''}" class="form-control text-center" >
              </div>   
              </div>
              
             <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">月人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="tv_hits_month"  value="{$info.tv_hits_month|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">周人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="tv_hits_week"  value="{$info.tv_hits_week|default=''}" class="form-control text-center" >
              </div>   
              </div>                                          
                                                                                    
              <div class="col-md-3 col-sm-6 col-xs-6 mb10 pr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">日人气：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" name="tv_hits_day"  value="{$info.tv_hits_day|default=''}" class="form-control text-center" >
              </div>   
              </div> 
              
               <div class="col-md-3 col-sm-6 col-xs-6 mb10 prrr0">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">评分值：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="tv_gold" name="tv_gold"  value="{$info.tv_gold|default=''}" class="form-control text-center" >
              </div>   
              </div>
                           
                <div class="col-md-3 col-sm-6 col-xs-6 mb10">
               <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">评分人：</span>
                <span class="form-left-title-hide"></span>
                </div>
                <!-- /btn-group -->
                <input type="text" id="tv_golder" name="tv_golder"  value="{$info.tv_golder|default=''}" class="form-control text-center" >
              </div>   
              </div>
              </div>
              <!-- /row -->
                             
              
                                             
            </div> 
            <!-- /.tab_2 -->
         
        <div class="box-footer {notempty name=":request()->param('dialog')"}hidden{/notempty} layer-footer">
          <div  class="footer-btn">
               <button type="submit" class="btn btn-success btn-embossed">确定</button>
               <button type="reset" class="btn btn-default btn-embossed">重置</button>
               {notempty name=":request()->param('dialog')"}
               <button type="reset" class="btn btn-primary btn-embossed btn-close" onClick="layer.closeAll();"> 关闭</button>
               {/notempty}
            </div>
       </div>
       <!-- /.box-footer -->     
</div>
<!-- /.box-body --> 
</form>
</div>
<!-- /.nav-tabs-custom -->    
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	zanpian.cms.vod();
    $(document).on('click', ".addurl", function() {
			var $old = $("#urldata>.urldata:last").html();
			$urln = $("#urldata>.urldata").length;
			$old = $old.replace("周期" + $urln, "周期" + ($urln + 1));
			$("#urldata>.urldata:last-child").after('<div class="urldata input-group mb10" id="data_' + ($urln + 1) + '">' + $old + '</div>');
			$("#urldata>.urldata:last #tv_date").val($("#tv_date:last option").val());
			$("#urldata>.urldata:last textarea").val('');
					
	})		

});	
</script>
</body>
</html>
